package com.apesource.mallproject.service.ServiceImpl;

import com.apesource.mallproject.dao.ISellerDao;
import com.apesource.mallproject.pojo.Seller;
import com.apesource.mallproject.service.ISellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SellerServiceImpl implements ISellerService {
    @Autowired
    private ISellerDao iSellerDao;

    @Override
    public List<Seller> findAll() {
        return iSellerDao.findAll();
    }

    @Override
    public List<Seller> showLike(String name, String nickName, Integer status) {

        return iSellerDao.showLike(name, nickName, status);
    }

    @Override
    public List<Seller> showStatus() {
        return iSellerDao.findStatus();
    }

    @Override
    public void updateStatus(Integer sellerId) {
        iSellerDao.updateStatus(sellerId);
    }

    @Override
    public void updateNoStatus(Integer sellerId) {
        iSellerDao.updateNoStatus(sellerId);
    }

    @Override
    public void delSeller(Integer sellerId) {
        iSellerDao.delSeller(sellerId);
    }

    @Override
    public void updateCloseStatus(Integer sellerId) {
        iSellerDao.updateCloseStatus(sellerId);
    }
}
